Integrand size = 21, antiderivative size = 129 \[ \int \sec ^8(c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {a b \sec ^5(c+d x)}{7 d}+\frac {\sec ^7(c+d x) (b+a \sin (c+d x)) (a+b \sin (c+d x))}{7 d}+\frac {\left (6 a^2-b^2\right ) \tan (c+d x)}{7 d}+\frac {2 \left (6 a^2-b^2\right ) \tan ^3(c+d x)}{21 d}+\frac {\left (6 a^2-b^2\right ) \tan ^5(c+d x)}{35 d} \]
1/7*a*b*sec(d*x+c)^5/d+1/7*sec(d*x+c)^7*(b+a*sin(d*x+c))*(a+b*sin(d*x+c))/ d+1/7*(6*a^2-b^2)*tan(d*x+c)/d+2/21*(6*a^2-b^2)*tan(d*x+c)^3/d+1/35*(6*a^2 -b^2)*tan(d*x+c)^5/d
Time = 0.52 (sec) , antiderivative size = 110, normalized size of antiderivative = 0.85 \[ \int \sec ^8(c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {\sec ^7(c+d x) \left (240 a b+105 \left (2 a^2+b^2\right ) \sin (c+d x)+21 \left (6 a^2-b^2\right ) \sin (3 (c+d x))+42 a^2 \sin (5 (c+d x))-7 b^2 \sin (5 (c+d x))+6 a^2 \sin (7 (c+d x))-b^2 \sin (7 (c+d x))\right )}{840 d} \]
(Sec[c + d*x]^7*(240*a*b + 105*(2*a^2 + b^2)*Sin[c + d*x] + 21*(6*a^2 - b^ 2)*Sin[3*(c + d*x)] + 42*a^2*Sin[5*(c + d*x)] - 7*b^2*Sin[5*(c + d*x)] + 6 *a^2*Sin[7*(c + d*x)] - b^2*Sin[7*(c + d*x)]))/(840*d)
Time = 0.46 (sec) , antiderivative size = 104, normalized size of antiderivative = 0.81, number of steps used = 9, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.381, Rules used = {3042, 3170, 25, 3042, 3148, 3042, 4254, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \sec ^8(c+d x) (a+b \sin (c+d x))^2 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {(a+b \sin (c+d x))^2}{\cos (c+d x)^8}dx\) |
\(\Big \downarrow \) 3170 |
\(\displaystyle \frac {\sec ^7(c+d x) (a \sin (c+d x)+b) (a+b \sin (c+d x))}{7 d}-\frac {1}{7} \int -\sec ^6(c+d x) \left (6 a^2+5 b \sin (c+d x) a-b^2\right )dx\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {1}{7} \int \sec ^6(c+d x) \left (6 a^2+5 b \sin (c+d x) a-b^2\right )dx+\frac {\sec ^7(c+d x) (a \sin (c+d x)+b) (a+b \sin (c+d x))}{7 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{7} \int \frac {6 a^2+5 b \sin (c+d x) a-b^2}{\cos (c+d x)^6}dx+\frac {\sec ^7(c+d x) (a \sin (c+d x)+b) (a+b \sin (c+d x))}{7 d}\) |
\(\Big \downarrow \) 3148 |
\(\displaystyle \frac {1}{7} \left (\left (6 a^2-b^2\right ) \int \sec ^6(c+d x)dx+\frac {a b \sec ^5(c+d x)}{d}\right )+\frac {\sec ^7(c+d x) (a \sin (c+d x)+b) (a+b \sin (c+d x))}{7 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{7} \left (\left (6 a^2-b^2\right ) \int \csc \left (c+d x+\frac {\pi }{2}\right )^6dx+\frac {a b \sec ^5(c+d x)}{d}\right )+\frac {\sec ^7(c+d x) (a \sin (c+d x)+b) (a+b \sin (c+d x))}{7 d}\) |
\(\Big \downarrow \) 4254 |
\(\displaystyle \frac {1}{7} \left (\frac {a b \sec ^5(c+d x)}{d}-\frac {\left (6 a^2-b^2\right ) \int \left (\tan ^4(c+d x)+2 \tan ^2(c+d x)+1\right )d(-\tan (c+d x))}{d}\right )+\frac {\sec ^7(c+d x) (a \sin (c+d x)+b) (a+b \sin (c+d x))}{7 d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {1}{7} \left (\frac {a b \sec ^5(c+d x)}{d}-\frac {\left (6 a^2-b^2\right ) \left (-\frac {1}{5} \tan ^5(c+d x)-\frac {2}{3} \tan ^3(c+d x)-\tan (c+d x)\right )}{d}\right )+\frac {\sec ^7(c+d x) (a \sin (c+d x)+b) (a+b \sin (c+d x))}{7 d}\) |
(Sec[c + d*x]^7*(b + a*Sin[c + d*x])*(a + b*Sin[c + d*x]))/(7*d) + ((a*b*S ec[c + d*x]^5)/d - ((6*a^2 - b^2)*(-Tan[c + d*x] - (2*Tan[c + d*x]^3)/3 - Tan[c + d*x]^5/5))/d)/7
3.4.99.3.1 Defintions of rubi rules used
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x _)]), x_Symbol] :> Simp[(-b)*((g*Cos[e + f*x])^(p + 1)/(f*g*(p + 1))), x] + Simp[a Int[(g*Cos[e + f*x])^p, x], x] /; FreeQ[{a, b, e, f, g, p}, x] && (IntegerQ[2*p] || NeQ[a^2 - b^2, 0])
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x _)])^(m_), x_Symbol] :> Simp[(-(g*Cos[e + f*x])^(p + 1))*(a + b*Sin[e + f*x ])^(m - 1)*((b + a*Sin[e + f*x])/(f*g*(p + 1))), x] + Simp[1/(g^2*(p + 1)) Int[(g*Cos[e + f*x])^(p + 2)*(a + b*Sin[e + f*x])^(m - 2)*(b^2*(m - 1) + a^2*(p + 2) + a*b*(m + p + 1)*Sin[e + f*x]), x], x] /; FreeQ[{a, b, e, f, g }, x] && NeQ[a^2 - b^2, 0] && GtQ[m, 1] && LtQ[p, -1] && (IntegersQ[2*m, 2* p] || IntegerQ[m])
Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Simp[-d^(-1) Subst[Int[Exp andIntegrand[(1 + x^2)^(n/2 - 1), x], x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]
Time = 1.43 (sec) , antiderivative size = 120, normalized size of antiderivative = 0.93
method | result | size |
derivativedivides | \(\frac {-a^{2} \left (-\frac {16}{35}-\frac {\left (\sec ^{6}\left (d x +c \right )\right )}{7}-\frac {6 \left (\sec ^{4}\left (d x +c \right )\right )}{35}-\frac {8 \left (\sec ^{2}\left (d x +c \right )\right )}{35}\right ) \tan \left (d x +c \right )+\frac {2 a b}{7 \cos \left (d x +c \right )^{7}}+b^{2} \left (\frac {\sin ^{3}\left (d x +c \right )}{7 \cos \left (d x +c \right )^{7}}+\frac {4 \left (\sin ^{3}\left (d x +c \right )\right )}{35 \cos \left (d x +c \right )^{5}}+\frac {8 \left (\sin ^{3}\left (d x +c \right )\right )}{105 \cos \left (d x +c \right )^{3}}\right )}{d}\) | \(120\) |
default | \(\frac {-a^{2} \left (-\frac {16}{35}-\frac {\left (\sec ^{6}\left (d x +c \right )\right )}{7}-\frac {6 \left (\sec ^{4}\left (d x +c \right )\right )}{35}-\frac {8 \left (\sec ^{2}\left (d x +c \right )\right )}{35}\right ) \tan \left (d x +c \right )+\frac {2 a b}{7 \cos \left (d x +c \right )^{7}}+b^{2} \left (\frac {\sin ^{3}\left (d x +c \right )}{7 \cos \left (d x +c \right )^{7}}+\frac {4 \left (\sin ^{3}\left (d x +c \right )\right )}{35 \cos \left (d x +c \right )^{5}}+\frac {8 \left (\sin ^{3}\left (d x +c \right )\right )}{105 \cos \left (d x +c \right )^{3}}\right )}{d}\) | \(120\) |
risch | \(-\frac {16 i \left (240 i a b \,{\mathrm e}^{7 i \left (d x +c \right )}+70 b^{2} {\mathrm e}^{8 i \left (d x +c \right )}-210 a^{2} {\mathrm e}^{6 i \left (d x +c \right )}-35 b^{2} {\mathrm e}^{6 i \left (d x +c \right )}-126 a^{2} {\mathrm e}^{4 i \left (d x +c \right )}+21 b^{2} {\mathrm e}^{4 i \left (d x +c \right )}-42 a^{2} {\mathrm e}^{2 i \left (d x +c \right )}+7 b^{2} {\mathrm e}^{2 i \left (d x +c \right )}-6 a^{2}+b^{2}\right )}{105 d \left (1+{\mathrm e}^{2 i \left (d x +c \right )}\right )^{7}}\) | \(141\) |
parallelrisch | \(-\frac {2 \left (105 \left (\tan ^{13}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a^{2}+210 \left (\tan ^{12}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a b -210 \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a^{2}+140 \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b^{2}+903 \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a^{2}+112 \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b^{2}+1050 \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a b -636 \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a^{2}+456 \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b^{2}+903 \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a^{2}+112 \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b^{2}+630 \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a b -210 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a^{2}+140 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b^{2}+105 a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+30 a b \right )}{105 d \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{7}}\) | \(261\) |
1/d*(-a^2*(-16/35-1/7*sec(d*x+c)^6-6/35*sec(d*x+c)^4-8/35*sec(d*x+c)^2)*ta n(d*x+c)+2/7*a*b/cos(d*x+c)^7+b^2*(1/7*sin(d*x+c)^3/cos(d*x+c)^7+4/35*sin( d*x+c)^3/cos(d*x+c)^5+8/105*sin(d*x+c)^3/cos(d*x+c)^3))
Time = 0.28 (sec) , antiderivative size = 99, normalized size of antiderivative = 0.77 \[ \int \sec ^8(c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {30 \, a b + {\left (8 \, {\left (6 \, a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{6} + 4 \, {\left (6 \, a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{4} + 3 \, {\left (6 \, a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} + 15 \, a^{2} + 15 \, b^{2}\right )} \sin \left (d x + c\right )}{105 \, d \cos \left (d x + c\right )^{7}} \]
1/105*(30*a*b + (8*(6*a^2 - b^2)*cos(d*x + c)^6 + 4*(6*a^2 - b^2)*cos(d*x + c)^4 + 3*(6*a^2 - b^2)*cos(d*x + c)^2 + 15*a^2 + 15*b^2)*sin(d*x + c))/( d*cos(d*x + c)^7)
Timed out. \[ \int \sec ^8(c+d x) (a+b \sin (c+d x))^2 \, dx=\text {Timed out} \]
Time = 0.18 (sec) , antiderivative size = 97, normalized size of antiderivative = 0.75 \[ \int \sec ^8(c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {3 \, {\left (5 \, \tan \left (d x + c\right )^{7} + 21 \, \tan \left (d x + c\right )^{5} + 35 \, \tan \left (d x + c\right )^{3} + 35 \, \tan \left (d x + c\right )\right )} a^{2} + {\left (15 \, \tan \left (d x + c\right )^{7} + 42 \, \tan \left (d x + c\right )^{5} + 35 \, \tan \left (d x + c\right )^{3}\right )} b^{2} + \frac {30 \, a b}{\cos \left (d x + c\right )^{7}}}{105 \, d} \]
1/105*(3*(5*tan(d*x + c)^7 + 21*tan(d*x + c)^5 + 35*tan(d*x + c)^3 + 35*ta n(d*x + c))*a^2 + (15*tan(d*x + c)^7 + 42*tan(d*x + c)^5 + 35*tan(d*x + c) ^3)*b^2 + 30*a*b/cos(d*x + c)^7)/d
Leaf count of result is larger than twice the leaf count of optimal. 260 vs. \(2 (119) = 238\).
Time = 0.34 (sec) , antiderivative size = 260, normalized size of antiderivative = 2.02 \[ \int \sec ^8(c+d x) (a+b \sin (c+d x))^2 \, dx=-\frac {2 \, {\left (105 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{13} + 210 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{12} - 210 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{11} + 140 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{11} + 903 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} + 112 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} + 1050 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{8} - 636 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 456 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 903 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 112 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 630 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 210 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 140 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 105 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 30 \, a b\right )}}{105 \, {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{7} d} \]
-2/105*(105*a^2*tan(1/2*d*x + 1/2*c)^13 + 210*a*b*tan(1/2*d*x + 1/2*c)^12 - 210*a^2*tan(1/2*d*x + 1/2*c)^11 + 140*b^2*tan(1/2*d*x + 1/2*c)^11 + 903* a^2*tan(1/2*d*x + 1/2*c)^9 + 112*b^2*tan(1/2*d*x + 1/2*c)^9 + 1050*a*b*tan (1/2*d*x + 1/2*c)^8 - 636*a^2*tan(1/2*d*x + 1/2*c)^7 + 456*b^2*tan(1/2*d*x + 1/2*c)^7 + 903*a^2*tan(1/2*d*x + 1/2*c)^5 + 112*b^2*tan(1/2*d*x + 1/2*c )^5 + 630*a*b*tan(1/2*d*x + 1/2*c)^4 - 210*a^2*tan(1/2*d*x + 1/2*c)^3 + 14 0*b^2*tan(1/2*d*x + 1/2*c)^3 + 105*a^2*tan(1/2*d*x + 1/2*c) + 30*a*b)/((ta n(1/2*d*x + 1/2*c)^2 - 1)^7*d)
Time = 5.41 (sec) , antiderivative size = 135, normalized size of antiderivative = 1.05 \[ \int \sec ^8(c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {\frac {2\,a\,b}{7}+\frac {a^2\,\sin \left (c+d\,x\right )}{7}+\frac {b^2\,\sin \left (c+d\,x\right )}{7}+{\cos \left (c+d\,x\right )}^2\,\left (\frac {6\,a^2\,\sin \left (c+d\,x\right )}{35}-\frac {b^2\,\sin \left (c+d\,x\right )}{35}\right )+{\cos \left (c+d\,x\right )}^4\,\left (\frac {8\,a^2\,\sin \left (c+d\,x\right )}{35}-\frac {4\,b^2\,\sin \left (c+d\,x\right )}{105}\right )+{\cos \left (c+d\,x\right )}^6\,\left (\frac {16\,a^2\,\sin \left (c+d\,x\right )}{35}-\frac {8\,b^2\,\sin \left (c+d\,x\right )}{105}\right )}{d\,{\cos \left (c+d\,x\right )}^7} \]